package com.timo.string;

/**
 * @Description: 类的详细说明
 * @Author: timo
 * @Date: 2019/9/11 14:59
 */
public class StringEquals {
    public static void main(String[] args) {
        String s = "Hello";
        s = "java";

        String s1 = "Hello";

        String s2=new String("Hello");

        System.out.println(s.equals(s1));
        System.out.println(s == s1);
        System.out.println(s2.equals(s));

        System.out.println(s2 == s1);
        System.out.println(s2 == s);

    }
}
